package controller

import (
	"gitee.com/fierce_wolf/go-fox-edge-common/httpserver"
	"go-fox-edge-kernel-manager/utils/RedisRpcUtils"
)

type operateRedisListController struct {
}

func (e *operateRedisListController) init() {
	httpserver.Server.POSTRaw("/proxy-redis-topic/proxy/redis/topic/channel", e.executeChannel)
	httpserver.Server.POSTRaw("/proxy-redis-topic/proxy/redis/topic/device", e.executeDevice)
}

func (e *operateRedisListController) executeChannel(context httpserver.Context, body map[string]interface{}) (interface{}, error) {
	return RedisRpcUtils.ExecuteChannel(body)
}

func (e *operateRedisListController) executeDevice(context httpserver.Context, body map[string]interface{}) (interface{}, error) {
	return RedisRpcUtils.ExecuteDevice(body)
}
